package com.neulogistics.contrib.procuredcenter.domain.model.aggregate;

import com.neulogistics.contrib.procuredcenter.domain.model.valueobject.VendorInfo;
import com.neulogistics.infrastructure.ddd.domain.seedwork.Entity;
import com.neulogistics.infrastructure.ddd.domain.seedwork.IAggregateRoot;
import lombok.Data;

import java.util.Date;

@Data
public class Goods extends Entity<Integer> implements IAggregateRoot {
    /**
     * 商品id
     */
    private Integer goodsId;

    /**
     * 商品名
     */
    private String goodsName;

    /**
     * 所属二级分类id
     */
    private Integer setId;

    /**
     * 计量单位
     */
    private String measureUnit;

    /**
     * 商品原价
     */
    private Double goodsPrice;

    /**
     * 商品折扣：75折:75；88折:88
     */
    private Integer goodsDiscount;

    /**
     * 商品成本
     */
    private Double goodsCost;

    /**
     * 商品型号
     */
    private String goodsModel;

    /**
     * {供应商id、供应商名称}
     */
    private VendorInfo vendorInfo;

    /**
     * 商品保质期限
     */
    private Date goodsShelfLife;

    /**
     * 可否退货：0:不可；1:可
     */
    private Integer optReturn;

    /**
     * 可否换货：0:不可；1:可
     */
    private Integer optReplace;

    /**
     * 商品备注信息
     */
    private String goodsRemark;

    /**
     * 是否删除
     */
    private Integer deleted;

    public Goods() {
    }

    public Goods(String goodsName, Integer setId, String measureUnit,
                 Double goodsPrice, Integer goodsDiscount,
                 Double goodsCost, String goodsModel,
                 VendorInfo vendorInfo, Date goodsShelfLife,
                 Integer optReturn, Integer optReplace,
                 String goodsRemark) {
        this.goodsName = goodsName;
        this.setId = setId;
        this.measureUnit = measureUnit;
        this.goodsPrice = goodsPrice;
        this.goodsDiscount = goodsDiscount;
        this.goodsCost = goodsCost;
        this.goodsModel = goodsModel;
        this.vendorInfo = vendorInfo;
        this.goodsShelfLife = goodsShelfLife;
        this.optReturn = optReturn;
        this.optReplace = optReplace;
        this.goodsRemark = goodsRemark;
    }
}
